package com.ruoyi.basicInfo.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicInfo.mapper.WarehouseMapper;
import com.ruoyi.basicInfo.domain.Warehouse;
import com.ruoyi.basicInfo.service.IWarehouseService;

import javax.annotation.Resource;

/**
 * 仓储信息Service业务层处理
 * 
 * @author zbw
 * @date 2022-07-16
 */
@Service
public class WarehouseServiceImpl implements IWarehouseService 
{
    @Resource
    private WarehouseMapper warehouseMapper;

    /**
     * 查询仓储信息
     * 
     * @param warehouseId 仓储信息主键
     * @return 仓储信息
     */
    @Override
    public Warehouse selectWarehouseByWarehouseId(String warehouseId)
    {
        return warehouseMapper.selectWarehouseByWarehouseId(warehouseId);
    }

    /**
     * 查询仓储信息列表
     * 
     * @param warehouse 仓储信息
     * @return 仓储信息
     */
    @Override
    public List<Warehouse> selectWarehouseList(Warehouse warehouse)
    {
        return warehouseMapper.selectWarehouseList(warehouse);
    }

    /**
     * 新增仓储信息
     * 
     * @param warehouse 仓储信息
     * @return 结果
     */
    @Override
    public int insertWarehouse(Warehouse warehouse)
    {
        return warehouseMapper.insertWarehouse(warehouse);
    }

    /**
     * 修改仓储信息
     * 
     * @param warehouse 仓储信息
     * @return 结果
     */
    @Override
    public int updateWarehouse(Warehouse warehouse)
    {
        return warehouseMapper.updateWarehouse(warehouse);
    }

    /**
     * 批量删除仓储信息
     * 
     * @param warehouseIds 需要删除的仓储信息主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseByWarehouseIds(String[] warehouseIds)
    {
        return warehouseMapper.deleteWarehouseByWarehouseIds(warehouseIds);
    }

    /**
     * 删除仓储信息信息
     * 
     * @param warehouseId 仓储信息主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseByWarehouseId(String warehouseId)
    {
        return warehouseMapper.deleteWarehouseByWarehouseId(warehouseId);
    }
}
